package com.learning.security.controller;

import com.learning.security.controller.vo.AdminAuthLoginRespVO;
import com.learning.security.controller.vo.AuthLoginReqVO;
import com.learning.security.service.AdminAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/system")
public class AuthController {
    @Autowired
    private AdminAuthService adminAuthService;

    @PostMapping("/login")
    public AdminAuthLoginRespVO login(@RequestBody AuthLoginReqVO authLoginReqVO) {
        return adminAuthService.login(authLoginReqVO);
    }
}
